<% if @preview_format == 'html' %>
<%= ApplicationController.helpers.stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'tribute-3.7.3', 'application', 'responsive', :media => 'all' %>
<%= ApplicationController.helpers.heads_for_theme %>
<% end %>
<link rel="stylesheet" media="all" href="<%= "#{@converter.public_web_directory}/stylesheets/redmine_more_previews_vince.css" %>">

<% @vcfs.each_with_index do |vcf, index| %>
  
  <div class="box business-card">
  
    <div class="contextual">
      <img src="<%= "#{@converter.public_web_directory}/images/#{@converter.settings[:logo]}" %>" alt="VCard Logo" title="VCard Logo" class="logo" %>
    </div>
    
    <h2><%= vcf.fn.readable.join(", ") %></h2>
    
    <% if vcf.logo.present? || vcf.photo.present? %>
      <div>
      
        <%  vcf.logo.readable.each do |img| %>
          <%= img %>
        <%  end %>
        
        <%  vcf.photo.readable.each do |img| %>
          <%= img %>
        <% end %>
        
      </div>
    <% end %>
    
    <div class="virtualbox tabular">
    
      <div class="splitcontent tabular">
        
        <% vcfn = vcf.select(:note) %>
        <% if vcfn.note.present? %>
          <div class="splitcontenttop"><%= vcfn.webalize(iconize: @iconize) %></div>
          <hr>
        <% end %>
        
        <% vcfk = vcf.select(:kind) %>
        <% if vcfk.kind.present? %>
          <div class="splitcontenttop"><%= vcfk.webalize(iconize: @iconize) %></div>
        <% end %>
        
        <div class="splitcontentleft">
          <h4><%= I18n.with_locale(Setting.default_language){I18n.translate(:"vcard.personal" )} %></h4>
          <%= vcf.select(:org, :n, :nickname, :gender, :bday, :anniversary, :lang).
                webalize(fields:[:org, :n, :nickname, :gender, :bday, :anniversary, :lang], iconize: @iconize) %>
        </div>
        
        <div class="splitcontentright">
        <% %w(WORK HOME PREF).each do |where| %>
        <%  vcfr = vcf.select_by_any_attribute(:adr, :label, :geo, :tel, :email, :impp, :url, :TYPE => /#{where}/i) %>
        <% if vcfr.present? %>
          <h4><%= I18n.with_locale(Setting.default_language){I18n.translate(:"vcard.TYPE_PARAM.#{where}" )} %></h4>
          <%= vcfr.webalize(fields: [:adr, :geo, :label, :tel, :email, :impp, :url], iconize: @iconize) %>
        <% end %>
        <% end %>
        
        <%  vcfr = vcf.unselect_by_any_attribute(:adr, :label, :geo, :tel, :email, :impp, :url, :TYPE => [/WORK/i, /HOME/i, /PREF/i]) %>
        <% if vcfr.present? %>
          <h4><%= I18n.with_locale(Setting.default_language){I18n.translate(:"vcard.TYPE_PARAM.OTHER" )} %></h4>
          <%= vcfr.webalize(fields: [:adr, :geo, :label, :tel, :email, :impp, :url], iconize: @iconize) %>
        <% end %>
        </div>
        
        <% vcfc = vcf.select(:categories) %>
          <% if vcfc.categories.present? %>
          <hr>
          <div class="splitcontenttop">
            <%= vcfc.webalize(iconize: @iconize) %>
          </div>
        <% end %>
        
      </div>
      
    </div>
    
  </div>
  
<% end %>